<template>
  <div>
    
<div class="container">
<div class="row">
    <div v-for='(item,index) in dataList' :key='index'><div class="col-md-4">
    <div class="media">
         <a href="#" class="pull-left"><img src="" class="media-object"  /></a>
        <div class="media-body">
            <h4 class="media-heading">
            <a  href="javascript:;" @click="showDetail(item.id)">
                用户表{{item.id}}</a>
            </h4> 
        </div>
    </div>
</div></div>
</div>
</div>


  </div>
</template>
<script>
import { getList } from '@/api/usersApi'

export default {
  name:'UsersQuery',
  data() {
    return {dataList:[]}
  },
  created() {
    this.$nextTick(() => {
      this.getList()
    })
  },
  methods: {
    showDetail(id){
      this.$router.push('/users-detail/'+id);
    },
    getList(){
       getList({}).then((resp) => {
        this.dataList = resp.data.data
      })
    }
  },
  beforeDestroy(){
this.removeFile('https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap.min.css','css');

  },
  mounted(){
this.loadFile('https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap1/5.0.2/css/bootstrap1.min.css','css');

  }
}

</script>
<style scoped>

</style>
